<#import "/spring.ftl" as spring/>
<#include "commonScript.ftl"/>
<script type="text/javascript">
    var formColumnSetting = [
        {
            index: "bizType",
            name: "bizType",
            label: "业务类型",
            readonly:true
        }, {
            index: "sup",
            name: "sup",
            label: "报关行",
            readonly:true
        }, {
            index: "contactNo",
            name: "contactNo",
            label: "合同协议号",
            readonly:true
        }, {
            index: "businessNo",
            name: "businessNo",
            label: "业务编码",
            readonly:true
        }, {
            index: "contaNum",
            name: "contaNum",
            label: "集装箱数量",
            readonly:true
        }, {
            index: "contaNo",
            name: "contaNo",
            label: "集装箱号",
            readonly:true
        }, {
            name: "sfComName",
            label: "收发货人",
            readonly:true
        }, {
            index: "blNo",
            name: "blNo",
            label: "提运单号",
            readonly:true
        }, {
            index: "custComName",
            name: "custComName",
            label: "实际委托人",
            readonly:true
        },  {
            index: "sno",
            name: "sno",
            label: "报关单号",
            readonly:true
        }
    ];

    var buttonSetting = [
        {
            id: "rtBtn",
            value: "返回",
            click: function () {
                location.href = "<@spring.url '/business/declaOpRec/listPage'/>"
            }
        }
        <#if isSup!false>
        ,
        {
            id: "exportDocRecordExcl",
            value: "新增操作记录",
            click: function () {
                //todo 导出单证发放记录
                layer.open({
                    type: 2,
                    title: false,
                    content: '<@spring.url "/business/declaOpRec/addPage"/>?did=${did}',
                    area: ['600px', '300px']
                });
            }
        }
        </#if>
        ];

    var gridSetting = {
        id: "operationRecord",
        title: "业务跟踪",
        url: "<@spring.url "/business/declaOpRec/hisOpRecGridData"/>?did=${did}",
        colModel: [{
            index: "recItemCode",
            name: "recItemCode",
            label:"操作项目",
            sortable:false,
            align:'center',
            formatter:function(val, colModel, row){
                return opCodeTranslate(val);
            }
        }, {
            index: "createTime",
            name: "createTime",
            label: "操作时间",
            sortable:false,
            align:'center',
            formatter:function(val){
                return new Date(val).toLocaleString();
            }
        }, {
            index: "creator",
            name: "creator",
            label: "操作人",
            sortable:false,
            align:'center'
        }, {
            index: "operatorComName",
            name: "operatorComName",
            label: "操作人公司",
            sortable:false,
            align:'center'
        }, {
            index: "remark",
            name: "remark",
            label: "说明",
            sortable:false,
            align:'center'
        }]
    };
</script>

